package reflect;

/**
 * 变长参数
 */
public class ArgsDemo {
    public static void main(String[] args) {
        dosome(1);  //编译为：dosome(1,new String[]{})
        dosome(1,"one");  //编译为：dosome(1,String[]{"one"})
        dosome(1,"one","two");
    }
    public static void dosome (int a ,String...args){  //编译为：......dosome（int a , String[] args）
        System.out.println(args.length);
    }
}
